import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useAdministrationStore = defineStore(
  'administration',
  () => {
    // 宿舍详细信息
    const dormitoryInfo = ref({})
    // 设施详细信息
    const facilityInfo = ref({})

    const setDormitoryInfo = (newVal) => {
      dormitoryInfo.value = newVal
    }
    const setFacilityInfo = (newVal) => {
      facilityInfo.value = newVal
    }

    return {
      dormitoryInfo,
      setDormitoryInfo,
      facilityInfo,
      setFacilityInfo,
    }
  },
  {
    persist: true,
  },
)
